<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Base;

use Carbon\Carbon;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class SchoolUser
 *
 * @property int $id
 * @property int $school_id 学校id
 * @property string $real_name 真实姓名
 * @property string|null $account 账号
 * @property string|null $tel 手机号
 * @property string|null $id_card 身份证号
 * @property bool $enable 是否启用
 * @property string|null $memo 备注
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser query()
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereAccount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereEnable($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereIdCard($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereMemo($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereRealName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereSchoolId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereTel($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser withTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|SchoolUser withoutTrashed()
 * @mixin \Eloquent
 */
class SchoolUser extends Model
{
	use SoftDeletes;
	use HasDateTimeFormatter;
	const ID = 'id';
	const SCHOOL_ID = 'school_id';
	const REAL_NAME = 'real_name';
	const ACCOUNT = 'account';
	const TEL = 'tel';
	const ID_CARD = 'id_card';
	const ENABLE = 'enable';
	const MEMO = 'memo';
	const CREATED_AT = 'created_at';
	const UPDATED_AT = 'updated_at';
	const DELETED_AT = 'deleted_at';
	protected $table = 'school_users';

	protected $casts = [
		self::ID => 'int',
		self::SCHOOL_ID => 'int',
		self::ENABLE => 'bool',
		self::CREATED_AT => 'datetime',
		self::UPDATED_AT => 'datetime'
	];
}
